IntentCompat

Helper for accessing features in Intent.

Properties

Link copied to clipboard
val ACTION_CREATE_REMINDER: String = "android.intent.action.CREATE_REMINDER"
Activity Action: Creates a reminder.
Link copied to clipboard
val CATEGORY_LEANBACK_LAUNCHER: String = "android.intent.category.LEANBACK_LAUNCHER"
Indicates an activity optimized for Leanback mode, and that should be displayed in the Leanback launcher.
Link copied to clipboard
val EXTRA_HTML_TEXT: String = "android.intent.extra.HTML_TEXT"
A constant String that is associated with the Intent, used with ACTION_SEND to supply an alternative to EXTRA_TEXT as HTML formatted text.
Link copied to clipboard
val EXTRA_START_PLAYBACK: String = "android.intent.extra.START_PLAYBACK"
Used as a boolean extra field in ACTION_VIEW intents to indicate that content should immediately be played without any intermediate screens that require additional user input, e.g.
Link copied to clipboard
val EXTRA_TIME: String = "android.intent.extra.TIME"
Optional extra specifying a time in milliseconds since the Epoch.

Functions

Link copied to clipboard
Make an Intent to redirect the user to UI to manage their unused app restriction settings for a particular app (e.g.
Link copied to clipboard
Retrieve extended data from the intent.
Link copied to clipboard
Retrieve extended data from the intent.
Link copied to clipboard
open fun <T> getParcelableExtra(@NonNull in: Intent, @Nullable name: String, @NonNull clazz: Class<T>): T
Retrieve extended data from the intent.
Link copied to clipboard
Returns the value associated with the given key or null if:
  • No mapping of the desired type exists for the given key.
  • A null value is explicitly associated with the key.
  • The object is not of type clazz.
Compatibility behavior:
  • SDK 34 and above, this method matches platform behavior.
  • SDK 33 and below, the object type is checked after deserialization.
Link copied to clipboard
open fun makeMainSelectorActivity(@NonNull selectorAction: String, @NonNull selectorCategory: String): Intent
Make an Intent for the main activity of an application, without specifying a specific activity to run but giving a selector to find the activity.